package com.eascs.p2p.common.entity;

import java.io.Serializable;
import javax.persistence.*;

import com.eascs.p2p.common.wallet.utils.BigDecimalUtils;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the p2p_investor_wallet_flow database table.
 * 
 */
@Entity
@Table(name="p2p_investor_wallet_flow")
@NamedQuery(name="P2pInvestorWalletFlow.findAll", query="SELECT p FROM P2pInvestorWalletFlow p")
public class InvestorWalletFlowEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String id;

	@Column(name="accumulate_income")
	private BigDecimal accumulateIncome;

	@Column(name="accumulate_recharge")
	private BigDecimal accumulateRecharge;

	@Column(name="accumulate_withdraw")
	private BigDecimal accumulateWithdraw;

	@Column(name="await_income")
	private BigDecimal awaitIncome;

	@Column(name="await_principal")
	private BigDecimal awaitPrincipal;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="create_time")
	private Date createTime;

	@Column(name="current_balance")
	private BigDecimal currentBalance;

	@Column(name="invest_frozen")
	private BigDecimal investFrozen;
	
	@Column(name="accumulate_vote")
	private BigDecimal accumulateVote;
	
	@Column(name="trans_balance")
	private BigDecimal transBalance;

	@Column(name="investor_id")
	private String investorId;

	@Column(name="trans_type")
	private byte transType;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="update_time")
	private Date updateTime;

	@Column(name="withdraw_frozen")
	private BigDecimal withdrawFrozen;

	public InvestorWalletFlowEntity() {
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public BigDecimal getAccumulateIncome() {
		return BigDecimalUtils.convertNull(this.accumulateIncome);
	}

	public void setAccumulateIncome(BigDecimal accumulateIncome) {
		this.accumulateIncome = accumulateIncome;
	}

	public BigDecimal getAccumulateRecharge() {
		return BigDecimalUtils.convertNull(this.accumulateRecharge);
	}

	public void setAccumulateRecharge(BigDecimal accumulateRecharge) {
		this.accumulateRecharge = accumulateRecharge;
	}

	public BigDecimal getAccumulateWithdraw() {
		return BigDecimalUtils.convertNull(this.accumulateWithdraw);
	}

	public void setAccumulateWithdraw(BigDecimal accumulateWithdraw) {
		this.accumulateWithdraw = accumulateWithdraw;
	}

	public BigDecimal getAwaitIncome() {
		return BigDecimalUtils.convertNull(this.awaitIncome);
	}

	public void setAwaitIncome(BigDecimal awaitIncome) {
		this.awaitIncome = awaitIncome;
	}

	public BigDecimal getAwaitPrincipal() {
		return BigDecimalUtils.convertNull(this.awaitPrincipal);
	}

	public void setAwaitPrincipal(BigDecimal awaitPrincipal) {
		this.awaitPrincipal = awaitPrincipal;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public BigDecimal getCurrentBalance() {
		return BigDecimalUtils.convertNull(this.currentBalance);
	}

	public void setCurrentBalance(BigDecimal currentBalance) {
		this.currentBalance = currentBalance;
	}

	public BigDecimal getInvestFrozen() {
		return BigDecimalUtils.convertNull(this.investFrozen);
	}

	public void setInvestFrozen(BigDecimal investFrozen) {
		this.investFrozen = investFrozen;
	}

	public String getInvestorId() {
		return this.investorId;
	}

	public void setInvestorId(String investorId) {
		this.investorId = investorId;
	}

	public byte getTransType() {
		return this.transType;
	}

	public void setTransType(byte transType) {
		this.transType = transType;
	}

	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public BigDecimal getWithdrawFrozen() {
		return BigDecimalUtils.convertNull(this.withdrawFrozen);
	}

	public void setWithdrawFrozen(BigDecimal withdrawFrozen) {
		this.withdrawFrozen = withdrawFrozen;
	}

	public BigDecimal getAccumulateVote() {
		return BigDecimalUtils.convertNull(this.accumulateVote);
	}

	public void setAccumulateVote(BigDecimal accumulateVote) {
		this.accumulateVote = accumulateVote;
	}

	public BigDecimal getTransBalance() {
		return transBalance;
	}

	public void setTransBalance(BigDecimal transBalance) {
		this.transBalance = transBalance;
	}

	@Override
	public String toString() {
		return "InvestorWalletFlowEntity [id=" + id + ", accumulateIncome=" + accumulateIncome + ", accumulateRecharge="
				+ accumulateRecharge + ", accumulateWithdraw=" + accumulateWithdraw + ", awaitIncome=" + awaitIncome
				+ ", awaitPrincipal=" + awaitPrincipal + ", createTime=" + createTime + ", currentBalance="
				+ currentBalance + ", investFrozen=" + investFrozen + ", accumulateVote=" + accumulateVote
				+ ", transBalance=" + transBalance + ", investorId=" + investorId + ", transType=" + transType
				+ ", updateTime=" + updateTime + ", withdrawFrozen=" + withdrawFrozen + "]";
	}

	
}